package chances.wechat.repository;

import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import chances.wechat.entity.OnlineEntry;
@Repository
public class OnlineRepository extends BaseRepository {

	/*public void insertOnline(OnlineEntry entry) {
		this.sqlSessionTemplate.insert("insertOnlineEntry", entry);
	}

	public OnlineEntry getOnline(String userId) {
		OnlineEntry entry = this.getOne("getOnlineByUserId", userId);
		return entry;
	}

	public void updateOnline(final OnlineEntry onlineEntry) {
		this.sqlSessionTemplate.update("updateOnlineEntry", onlineEntry);
	}

	public void deleteOnline(Long userId) {
		this.sqlSessionTemplate.delete("deleteOnlineEntry", userId);
	}

	public void deleteByUserId(String userId){
		this.sqlSessionTemplate.delete("deleteOnlineEntryByUserId",userId);
	}
	public List<OnlineEntry> listOnline(String device, int start, int size) {
		return this.sqlSessionTemplate.selectList("listOnline", device,
				new RowBounds(start, size));
	}

	public List<OnlineEntry> isOnline(List<String> ids) {
		return this.sqlSessionTemplate.selectList("listOnlineByUserIds", ids);
	}*/
}
